Add precipitation to weather card#1098
Add precipitation to weather card#1098escoand wants to merge 4 commits intohome-assistant:masterfrom
Conversation
|
stupid question: no weather component has data for this in its forecast. so where do you get the data from? |
|
please test your stuff before you create a PR |
|
Which came first, chicken or egg? In this case both: home-assistant/core#13971 |
|
Link the PR in the description please and add screenshots |
|
Thanks for reopening. I've referenced the other way around and this is visible on the website. But you're right, it's not visible ie in the OctoDroid Android App. |
|
Currently there is no unit for the values, but this is a problem for the temperatures as well. The openweathermap precipitation is in mm. Should we at this to the HTML? |
|
we have units defined here hass.config.core.unit_system -> length. for metric we use [mm] for precipitation |
|
... and imperial uses inch/in. |
|
Ok, thanks I'll look into it. But I meant if the unit should be visible. |
|
Backend PR was merged. Maybe we do the unit thing in a second PR. |
getUnit(measure) {
if (measure === 'precipitation') {
return this.getUnit('length') === 'km' ? 'mm' : 'in';
}
return this.hass.config.core.unit_system[measure] || '';
}what about the more-info-card? https://github.com/home-assistant/home-assistant-polymer/blob/master/src/dialogs/more-info/controls/more-info-weather.html |
|
Don't know if every weather provider gives this value as mm/inch or if we get rain probability and therefore should pass the unit together with the data. |
|
Then you should check this |
|
I solved the merge conflicts in #1221, If we get problems with incorrect units that should be fixed in main repo components |
I've added the precipitation into the forecast chart.
Pull-request for OpenWeatherMap component: home-assistant/core#13971